import Vue from 'vue'

Vue.directive('img-lazy', {
  update: function (el, binding, vnode) {
    if (binding.value) {
      el.setAttribute('src', binding.value)
    } else {
      el.removeAttribute('src')
    }
  }
})
